<template>
	<view class="page tn-safe-area-inset-bottom" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
		<view class="top-bg"></view>
		<dawnBar title="病案复印申请"></dawnBar>
		<view class="page-container" style="padding-bottom: 140rpx;">
			<tn-sticky>
				<view @click="showAgree = true" v-if="notice.length > 0 "
					class="dawn-shadow tn-margin-bottom-sm fix-position">
					<tn-notice-bar :radius='radiusNotice' :show="closeNoticeShow" :list="notice" :rightIcon="true"
						backgroundColor="tn-bg-dawn-gray" @close="closeNoticeShow = false"></tn-notice-bar>
				</view>
			</tn-sticky>
			
			<view class="dawn-box tn-width-full tn-margin-bottom-sm tn-margin-top-sm">
				<tn-steps :current='stepNum' mode="number" activeColor="#00a1e9" class="tn-width-full"
					:list="steps"></tn-steps>
			</view>

			<pBox @search="initData()" :search="true" :verify="verify"></pBox>

			<view v-if="patientInfo.id">

				<view v-if="stepNum === 1">
					<view class="dawn-wrap tn-margin-top-sm">
						<view class="list-box" style="display: block;">
							<view class="list-box__left">
								<view class="list-box__left__text">复印病案类型</view>
							</view>
							<view class="tn-width-full tn-margin-top-xs tn-flex tn-flex-wrap">
								<view v-for="(item,index) in medicalTypeList" :key="index">
									<view class="dawn-check-box" style="padding: 7px 10px;"
										:class="item.status === 1?'dawn-check-box__select':''">
										<view class="dawn-text-md">
											{{ item.label }}
										</view>
										<view v-if="item.status === 1" class="dawn-check-box__select--icon"
											style="font-size: 13px;">
											<view class="tn-icon-success-square-fill"></view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>

					<view class="dawn-wrap tn-margin-top-sm">
						<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark">
							<text class="tn-icon-order-fill "></text>
							<text class="">病案信息</text>
						</view>
						<view class="">
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="">住院号</view>
								</view>
								<view class="list-box__right">
									<tn-input v-model="formData.hospitalNo" class="tn-input-text" :height="heightInput"
										placeholder="请填写住院号" :clearable="true" type="text"></tn-input>
									<!-- <text @click="scan" class="list-box__right__icon tn-icon-scan"></text> -->
								</view>
							</view>
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="list-box__left__text">出院日期</view>
								</view>
								<view class="list-box__right">
									<view @click="openBox('leaveHospitalDate')" class="tn-input-select">
										<text v-if="formData.leaveHospitalDate">{{ formData.leaveHospitalDate }}</text>
										<text v-else class="tn-color-gray">请选择出院日期</text>
										<text class="tn-padding-right-ss tn-input-select__select tn-icon-up-triangle"
											:class="showTime?'tn-input-select__select--reverse':''"></text>
									</view>
								</view>
							</view>
							<view class="list-box">
								<text class="dawn-color-red dawn-text-sm">只可选择7天前病案（出院7天后方可复印）</text>
							</view>
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="list-box__left__text">出院科室</view>
								</view>
								<view class="list-box__right">
									<view @click="openBox('leaveHospitalDept')" class="tn-input-select">
										<text v-if="formData.leaveHospitalDept">{{ formData.leaveHospitalDept }}</text>
										<text v-else class="tn-color-gray">请选择出院科室</text>
										<text class="tn-padding-right-ss tn-input-select__select tn-icon-up-triangle"
											:class="showSelect && showSelectType === 'leaveHospitalDept'?'tn-input-select__select--reverse':''"></text>
									</view>
								</view>
							</view>
						</view>
					</view>

					<view class="dawn-wrap tn-margin-top-sm">
						<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark ">
							<text class="tn-icon-image-text-fill"></text>
							<text class="">申请信息</text>
						</view>
						<view class="">
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="">复印份数</view>
								</view>
								<view class="list-box__right">
									<tn-number-box v-model="formData.number" :min="1" :max="100"></tn-number-box>
									<!-- <text class="list-box__right__icon tn-icon-add"></text> -->
								</view>
							</view>
							<view class="list-box" style="display: block;">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="list-box__left__text">复印用途</view>
								</view>
								<view class="tn-width-full tn-margin-top-xs dawn-border tn-flex tn-flex-wrap">
									<view v-for="(item,index) in purposeList" :key="index" @click="chooseDict(item)">
										<view class="dawn-check-box"
											style="padding: 7px 10px;white-space: normal;text-align:left;"
											:class="item.status === 1?'dawn-check-box__select':''">
											<view class="dawn-text-sm">
												{{ item.label }}
											</view>
											<view v-if="item.status === 1" class="dawn-check-box__select--icon"
												style="font-size: 13px;">
												<view class="tn-icon-success-square-fill"></view>
											</view>
										</view>
									</view>
								</view>
							</view>
							<view class="list-box" style="display: block;">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="list-box__left__text">复印内容</view>
								</view>
								<view class="tn-width-full tn-margin-top-xs dawn-border tn-flex tn-flex-wrap">
									<view v-for="(item,index) in contentList" :key="index" @click="chooseDict(item)">
										<view class="dawn-check-box"
											style="padding: 7px 10px;white-space: normal;text-align:left;"
											:class="item.status === 1?'dawn-check-box__select':''">
											<view class="dawn-text-sm">
												{{ item.label }}
											</view>
											<view v-if="item.status === 1" class="dawn-check-box__select--icon"
												style="font-size: 13px;">
												<view class="tn-icon-success-square-fill"></view>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>

				<view v-if="stepNum === 2">
					<view class="dawn-wrap tn-margin-top-sm">
						<view class="list-box">
							<view class="list-box__left">
								<!-- <text class="dawn-color-red tn-padding-right-ss">*</text> -->
								<view class="list-box__left__text">患者类型</view>
							</view>
							<view class="list-box__right">
								<view @click="openBox('patientType')" class="tn-input-select">
									<text v-if="formData.patientType">{{ formData.patientType }}</text>
									<text v-else class="tn-color-gray">请选择患者类型</text>
									<text class="tn-padding-right-ss tn-input-select__select tn-icon-up-triangle"
										:class="showSelect && showSelectType === 'patientType'?'tn-input-select__select--reverse':''"></text>
								</view>
							</view>
						</view>
						<view class="list-box">
							<view class="list-box__left">
								<text class="dawn-color-red tn-padding-right-ss">*</text>
								<view class="list-box__left__text">与患者关系</view>
							</view>
							<view class="list-box__right">
								<view v-if="formData.patientType === '年满18岁'" @click="openBox('relation')" class="tn-input-select">
									<text v-if="formData.relation">{{ formData.relation }}</text>
									<text v-else class="tn-color-gray">请选择与患者关系</text>
									<text class="tn-padding-right-ss tn-input-select__select tn-icon-up-triangle"
										:class="showSelect && showSelectType === 'relation'?'tn-input-select__select--reverse':''"></text>
								</view>
								<view v-else class="tn-input-select">
									<text>{{ formData.relation }}</text>
								</view>
							</view>
						</view>
					</view>

					<view class="dawn-wrap tn-margin-top-sm ">
						<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark">
							<text class="tn-icon-camera-fill"></text>
							<text class="">拍摄证件要求</text>
						</view>
						<view class="tn-padding-sm tn-bg-dawn-gray dawn-radius tn-margin-top-sm">
							<view class="tn-margin-bottom-xs">
								<view class="dawn-text-sm">
									<text class="tn-margin-right-ss">确保证件照片</text> <em
										class="dawn-color-red">边框完整，字体清晰，亮度均匀；</em>
								</view>
							</view>
							<view class="aui-palace">
								<view class="aui-palace-grid">
									<image src="../../static/images/item_01.png" alt="">
										<p>标准</p>
								</view>
								<view class="aui-palace-grid">
									<image src="../../static/images/item_02.png" alt="">
										<p>边框缺失</p>
								</view>
								<view class="aui-palace-grid">
									<image src="../../static/images/item_03.png" alt="">
										<p>边框模糊</p>
								</view>
								<view class="aui-palace-grid">
									<image src="../../static/images/item_04.png" alt="">
										<p>闪光强烈</p>
								</view>
							</view>
						</view>
					</view>
					<view class="dawn-wrap tn-margin-top-sm ">
						<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark">
							<text class="tn-icon-identity-fill"></text>
							<text class="">患者证件照</text>
						</view>

						<view v-if="formData.patientType === '年满18岁'" class="upload-card-box tn-width-full">
							<view class="card-img">
								<image v-if="formData.patientCardImgFront" @click="previewImage('patientCardImgFront')"
									:src='formData.patientCardImgFront' class="card-img__img" mode="widthFix" />
								<image v-else @click.stop="uploadpic('patientCardImgFront')" :src='imgFront'
									class="card-img__img" mode="widthFix" />
								<text v-if="formData.patientCardImgFront" class="del_btn tn-icon-close-fill"
									@click="delImage('patientCardImgFront')"></text>
								<text class="card-img__text">上传身份证人像面</text>
							</view>
							<view class="card-img">
								<image v-if="formData.patientCardImgReverse"
									@click="previewImage('patientCardImgReverse')" :src='formData.patientCardImgReverse'
									class="card-img__img" mode="widthFix" />
								<image v-else @click.stop="uploadpic('patientCardImgReverse')" :src='imgReverse'
									class="card-img__img" mode="widthFix" />
								<text v-if="formData.patientCardImgReverse" class="del_btn tn-icon-close-fill"
									@click="delImage('patientCardImgReverse')"></text>
								<view class="tn-flex tn-flex-col-center">
									<text class="card-img__text">上传身份证国徽面</text>
								</view>
							</view>
							<!-- <view class="card-img">
								<image v-if="formData.patientCardImgHandheld"
									@click="previewImage('patientCardImgHandheld')"
									:src='formData.patientCardImgHandheld' class="card-img__img" mode="widthFix" />
								<image v-else @click.stop="uploadpic('patientCardImgHandheld')" :src='imgHandheld'
									class="card-img__img" mode="widthFix" />
								<text v-if="formData.patientCardImgHandheld" class="del_btn tn-icon-close-fill"
									@click="delImage('patientCardImgHandheld')"></text>
								<text class="card-img__text">上传身份证手持照</text>
							</view> -->
						</view>

						<view v-else class="upload-card-box tn-width-full" style="justify-content:space-around;">
							<view class="card-img">
								<image v-if="formData.patientCardImgFront" @click="previewImage('patientCardImgFront')"
									:src='formData.patientCardImgFront' class="card-img__img" mode="widthFix" />
								<image v-else @click.stop="uploadpic('patientCardImgFront')" :src='imgUpload'
									class="card-img__img" mode="widthFix" />
								<text v-if="formData.patientCardImgFront" class="del_btn tn-icon-close-fill"
									@click="delImage('patientCardImgFront')"></text>
								<text class="card-img__text">上传患者户口本页</text>
							</view>
							<view class="card-img">
								<image v-if="formData.patientCardImgReverse"
									@click="previewImage('patientCardImgReverse')" :src='formData.patientCardImgReverse'
									class="card-img__img" mode="widthFix" />
								<image v-else @click.stop="uploadpic('patientCardImgReverse')" :src='imgUpload'
									class="card-img__img" mode="widthFix" />
								<text v-if="formData.patientCardImgReverse" class="del_btn tn-icon-close-fill"
									@click="delImage('patientCardImgReverse')"></text>
								<view class="tn-flex tn-flex-col-center">
									<text class="card-img__text">上传申请人户口本页</text>
								</view>
							</view>
						</view>

						<view class="">
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="">姓名</view>
								</view>
								<view class="list-box__right">
									<tn-input v-model="formData.patientName" class="tn-input-text" :height="heightInput"
										placeholder="请填写患者姓名" :clearable="true" type="text"></tn-input>
									<!-- <text class="list-box__right__icon tn-icon-add"></text> -->
								</view>
							</view>
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="">身份证号</view>
								</view>
								<view class="list-box__right">
									<tn-input v-model="formData.patientCardNo" class="tn-input-text"
										:height="heightInput" placeholder="请填写患者身份证号" :clearable="true"
										type="text"></tn-input>
									<!-- <text class="list-box__right__icon tn-icon-add"></text> -->
								</view>
							</view>
						</view>

					</view>

					<view v-if="formData.relation !== '本人'">
						<view class="dawn-wrap tn-margin-top-sm ">
							<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark">
								<text class="tn-icon-identity-fill"></text>
								<text class="">申请人证件照</text>
							</view>

							<view class="upload-card-box tn-width-full">
								<view class="card-img">
									<image v-if="formData.applicantCardImgFront"
										@click="previewImage('applicantCardImgFront')"
										:src='formData.applicantCardImgFront' class="card-img__img" mode="widthFix" />
									<image v-else @click.stop="uploadpic('applicantCardImgFront')" :src='imgFront'
										class="card-img__img" mode="widthFix" />
									<text v-if="formData.applicantCardImgFront" class="del_btn tn-icon-close-fill"
										@click="delImage('applicantCardImgFront')"></text>
									<text class="card-img__text">上传身份证人像面</text>
								</view>
								<view class="card-img">
									<image v-if="formData.applicantCardImgReverse"
										@click="previewImage('applicantCardImgReverse')"
										:src='formData.applicantCardImgReverse' class="card-img__img" mode="widthFix" />
									<image v-else @click.stop="uploadpic('applicantCardImgReverse')" :src='imgReverse'
										class="card-img__img" mode="widthFix" />
									<text v-if="formData.applicantCardImgReverse" class="del_btn tn-icon-close-fill"
										@click="delImage('applicantCardImgReverse')"></text>
									<text class="card-img__text">上传身份证国徽面</text>
								</view>
								<!-- <view class="card-img">
									<image v-if="formData.applicantCardImgHandheld"
										@click="previewImage('applicantCardImgHandheld')"
										:src='formData.applicantCardImgHandheld' class="card-img__img"
										mode="widthFix" />
									<image v-else @click.stop="uploadpic('applicantCardImgHandheld')" :src='imgHandheld'
										class="card-img__img" mode="widthFix" />
									<text v-if="formData.applicantCardImgHandheld" class="del_btn tn-icon-close-fill"
										@click="delImage('applicantCardImgHandheld')"></text>
									<text class="card-img__text">上传身份证手持照</text>
								</view> -->
							</view>

							<view class="">
								<view class="list-box">
									<view class="list-box__left">
										<text class="dawn-color-red tn-padding-right-ss">*</text>
										<view class="">姓名</view>
									</view>
									<view class="list-box__right">
										<tn-input v-model="formData.applicantName" class="tn-input-text"
											:height="heightInput" placeholder="请填写申请人姓名" :clearable="true"
											type="text"></tn-input>
										<!-- <text class="list-box__right__icon tn-icon-add"></text> -->
									</view>
								</view>
								<view class="list-box">
									<view class="list-box__left">
										<text class="dawn-color-red tn-padding-right-ss">*</text>
										<view class="">身份证号</view>
									</view>
									<view class="list-box__right">
										<tn-input v-model="formData.applicantCardNo" class="tn-input-text"
											:height="heightInput" placeholder="请填写申请人身份证号" :clearable="true"
											type="text"></tn-input>
										<!-- <text class="list-box__right__icon tn-icon-add"></text> -->
									</view>
								</view>
							</view>

						</view>

						<view class="dawn-wrap tn-margin-top-sm " v-if="formData.patientType === '年满18岁'">
							<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark">
								<text class="tn-icon-image-fill"></text>
								<text class="">授权委托书</text>
							</view>

							<view class="upload-card-box tn-width-full" style="align-items:center;">
								<view class="card-img">
									<image v-if="formData.otherFile" @click="previewImage('otherFile')"
										:src='formData.otherFile' class="card-img__img" mode="widthFix" />
									<image v-else @click.stop="uploadpic('otherFile')" :src='imgOtherFile'
										class="card-img__img" mode="widthFix" />
									<text v-if="formData.otherFile" class="del_btn tn-icon-close-fill"
										@click="delImage('otherFile')"></text>
									<text class="card-img__text">上传授权委托书</text>
								</view>
								<view class="card-img" style="width: 60%;">
									<view class="dawn-text-sm">
										<view class="">1、近亲属如果在同一户口本，可以用户口本代替委托书，否则均需要委托书</view>
										<view class="">2、公务人员用单位介绍信或函代替委托书</view>
									</view>
									
								</view>
							</view>

						</view>

					</view>
				</view>

				<view v-if="stepNum === 3">
					<view class="dawn-wrap tn-margin-top-sm">
						<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark">
							<text class="tn-icon-logistics-fill"></text>
							<text class="">选择收取方式</text>
						</view>
						<view class="tn-flex tn-margin-bottom-sm">
							<view class="tn-width-full">
								<view class="dawn-check-box"
									:class="formData.collectType === '邮寄'?'dawn-check-box__select':''">
									<view class="dawn-text-md">
										邮寄
									</view>
									<view v-if="formData.collectType === '邮寄'" class="dawn-check-box__select--icon">
										<view class="tn-icon-success-square-fill"></view>
									</view>
								</view>
							</view>
							<view class="tn-width-full" @click="formData.collectType = '自提'">
								<view class="dawn-check-box"
									:class="formData.collectType === '自提'?'dawn-check-box__select':''">
									<view class="dawn-text-md">
										自提
									</view>
									<view v-if="formData.collectType === '自提'" class="dawn-check-box__select--icon">
										<view class="tn-icon-success-square-fill"></view>
									</view>
								</view>
							</view>
						</view>
						<view v-if="formData.collectType === '邮寄'" @click="nav('/hosp/address/list')"
							class="dawn-radius tn-margin-xs tn-bg-dawn-gray tn-padding-sm">
							<view class="tn-text-center">
								<view class="dawn-text-lg dawn-color-dark">
									<text class="tn-icon-map-fill tn-margin-right-xs"></text>
									<text>选择收件地址</text>
								</view>
								<view class="tn-margin-top-ss tn-text-sm">
									<text class="dawn-color-red">为了保证您能及时收到邮件、请确保收件地址准确无误。</text>
								</view>
							</view>
							<view class="dawn-flex-between" v-if="formData.recipientName">
								<view class="">
									<view class="">
										<text class="tn-padding-right-ss">{{ formData.recipientName }}</text>
										<text class="">{{ formData.recipientPhone }}</text>
									</view>
									<view class="dawn-text-sm">
										<text class="">{{ formData.recipientAddress }}</text>
									</view>
								</view>
								<view class="">
									<text class="tn-icon-right-double"></text>
								</view>
							</view>
						</view>
						<view v-else class="">
							<view v-if="collectAddress.length > 0"
								class="dawn-check-box dawn-check-box__select dawn-radius">
								<view class="">
									<view class="dawn-text-sm">
										<text class="">{{ collectAddress[0].label }}</text>
										<!-- <text class="tn-margin-left-ss tn-margin-right-ss">|</text>
									<text class="">{{ collectAddress[0].value }}</text> -->
									</view>
								</view>
								<view class="dawn-check-box__select--icon">
									<view class="tn-icon-success-square-fill"></view>
								</view>
							</view>
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="">取件人</view>
								</view>
								<view class="list-box__right">
									<tn-input v-model="formData.recipientName" class="tn-input-text"
										:height="heightInput" placeholder="请填写取件人姓名" :clearable="true"
										type="text"></tn-input>
									<!-- <text class="list-box__right__icon tn-icon-add"></text> -->
								</view>
							</view>
							<view class="list-box">
								<view class="list-box__left">
									<text class="dawn-color-red tn-padding-right-ss">*</text>
									<view class="">取件人电话</view>
								</view>
								<view class="list-box__right">
									<tn-input v-model="formData.recipientPhone" class="tn-input-text"
										:height="heightInput" placeholder="请填写取件人电话" :clearable="true"
										type="text"></tn-input>
									<!-- <text class="list-box__right__icon tn-icon-add"></text> -->
								</view>
							</view>
						</view>

					</view>


				</view>

				<view v-if="stepNum === 4">
					<view class="dawn-wrap tn-margin-top-sm">
						<view class="dawn-border-bottom tn-padding-bottom-ss dawn-color-dark">
							<text class="tn-icon-image-text-fill"></text>
							<text class="">申请信息</text>
						</view>
						<view class="">
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">患者姓名</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.patientName }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">患者证件号</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.patientCardNo }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">住院号</view>
								</view>
								<view class="list-box__right">
									<text class="dawn-color-red">{{ formData.hospitalNo }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">出院日期</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.leaveHospitalDate }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">出院科室</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.leaveHospitalDept }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">病案类型</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.medicalType }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">病案用途</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.purpose }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">病案内容</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.content }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">复印份数</view>
								</view>
								<view class="list-box__right">
									<text class="dawn-color-red">{{ formData.number }}</text>
								</view>
							</view>
						</view>
					</view>
					<view class="dawn-wrap tn-margin-top-sm">
						<!-- <view class="dawn-border-bottom tn-padding-bottom-ss">
					<text class="tn-icon-title"></text>
					<text class="">申请信息</text>
				</view> -->
						<view class="">
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">申请人姓名</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.applicantName }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">申请人证件号</view>
								</view>
								<view class="list-box__right">
									<text>{{ formData.applicantCardNo }}</text>
								</view>
							</view>
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">与患者关系</view>
								</view>
								<view class="list-box__right">
									<text class="dawn-color-red">{{ formData.relation }}</text>
								</view>
							</view>
						</view>
					</view>
					<view class="dawn-wrap tn-margin-top-sm">
						<!-- <view class="dawn-border-bottom tn-padding-bottom-ss">
						<text class="tn-icon-title"></text>
						<text class="">收取方式</text>
					</view> -->
						<view class="">
							<view class="list-box">
								<view class="list__left">
									<view class="list__left__text">收取方式</view>
								</view>
								<view class="list-box__right">
									<text class="dawn-color-red">{{ formData.collectType }}</text>
								</view>
							</view>
							<view class="">
								<view v-if="formData.collectType === '邮寄'"
									class="dawn-radius tn-margin-xs tn-bg-dawn-gray tn-padding-sm">
									<view class="dawn-text-sm">
										<text class="">{{ formData.recipientAddress }}</text>
									</view>
									<view class="">
										<text class="tn-padding-right-ss">{{ formData.recipientName }}</text>
										<text class="">{{ formData.recipientPhone }}</text>
									</view>
								</view>
								<view v-else class="">
									<view class="list-box">
										<view class="list__left">
											<view class="list__left__text">取件地址</view>
										</view>
										<view class="list-box__right">
											<text>{{ formData.recipientAddress }}</text>
										</view>
									</view>
									<view class="list-box">
										<view class="list__left">
											<view class="list__left__text">取件人</view>
										</view>
										<view class="list-box__right">
											<text>{{ formData.recipientName }}</text>
										</view>
									</view>
									<view class="list-box">
										<view class="list__left">
											<view class="list__left__text">取件人电话</view>
										</view>
										<view class="list-box__right">
											<text>{{ formData.recipientPhone }}</text>
										</view>
									</view>

								</view>

							</view>
						</view>
					</view>


				</view>

			</view>
			<view v-if="show">
				<dawnMsg :box="dawnMsgBox" :msg="msg"></dawnMsg>
			</view>
		</view>

		<!-- 悬浮按钮-->
		<view class="tn-flex tn-footerfixed">
			<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
				<tn-button :disabled="stepNum<=1?true:false" width="90%" @click="onSteps('left')" size="lg" shadow>
					<text class="tn-icon-left-arrow tn-padding-right-ss"></text>
					<text class="tn-text-ellipsis">上一步</text>
				</tn-button>
			</view>
			<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
				<tn-button v-if="stepNum >= 4" width="90%" @click="onSubmit()" backgroundColor="tn-main-gradient-danger"
					size="lg" shadow>
					<text class="tn-icon-check tn-padding-right-ss"></text>
					<text class="tn-text-ellipsis">确认申请</text>
				</tn-button>
				<tn-button v-else width="90%" @click="onSteps('right')" backgroundColor="tn-main-gradient-dawn"
					size="lg" shadow>
					<text class="tn-icon-right-arrow tn-padding-right-ss"></text>
					<text class="tn-text-ellipsis">下一步</text>
				</tn-button>
			</view>
		</view>

		<!-- loading -->
		<dawnLoading :show="loading"></dawnLoading>

		<!-- 悬浮按钮-->
		<!-- <NavBtn></NavBtn> -->

		<!-- <tn-picker :title="showTitle" v-model="showTime" :params="paramsTime" mode="time"
			@confirm="confirmBox($event,'date')"></tn-picker> -->

		<tn-calendar @change="calendarConfirm" :changeMonth="true" v-model="showTime" :maxDate="maxDate" mode="date"
			toolTips="出院日期" startText="开始" endText="结束"></tn-calendar>

		<tn-select v-model="showSelect" :title="selectTitle" :list="selectData" @cancel="showSelect = false"
			@confirm="confirmBox($event,'select')">
		</tn-select>

		<tn-popup v-model="showAgree" :maskCloseable="maskCloseable" mode="center" width="90%"
			:borderRadius="borderRadius">
			<view class="content">
				<tn-list-cell>
					<view class="tn-text-center">
						<text class="dawn-text-lg dawn-color">{{ article.title }}</text>
					</view>
				</tn-list-cell>
				<scroll-view scroll-y="true" style="height: 60vh;">
					<view class='conters'>
						<parser :html="article.content" ref="article"></parser>
					</view>
				</scroll-view>
				<view v-if="isCheck"
					class="tn-flex tn-flex-row-center tn-flex-col-center tn-width-full tn-padding-top tn-padding-bottom">
					<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
						<tn-button width="90%" @click="onAgree()" backgroundColor="tn-main-gradient-dawn" size="lg"
							shadow>
							<text class="tn-icon-check tn-padding-right-ss"></text>
							<text class="tn-text-ellipsis">我已知晓</text>
						</tn-button>
					</view>
				</view>
				<view v-else
					class="tn-flex tn-flex-row-center tn-flex-col-center tn-width-full tn-padding-top tn-padding-bottom">
					<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
						<tn-button width="90%" @click="goBack()" size="lg" shadow>
							<text class="tn-icon-close tn-padding-right-ss"></text>
							<text class="tn-text-ellipsis">取消</text>
						</tn-button>
					</view>
					<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
						<tn-button width="90%" @click="onAgree()" backgroundColor="tn-main-gradient-danger" size="lg"
							shadow>
							<text class="tn-icon-check tn-padding-right-ss"></text>
							<text class="tn-text-ellipsis">同意</text>
						</tn-button>
					</view>
				</view>
			</view>
		</tn-popup>
	</view>
</template>

<script>
	import page_mixin from '@/mixins/page_mixin.js'
	import dayjs from '@/plugin/dayjs/dayjs.min.js';
	import * as DateUtil from '@/utils/date.js';
	import * as MedicalCopyApi from '@/api/hospital/medicalcopy.js';
	import * as ToolsApi from '@/api/hospital/tools.js';
	import * as PatientApi from '@/api/hospital/patient.js';
	import * as UserPatient from '@/libs/userPatient.js';
	import * as ArticleApi from '@/api/cms/article.js';
	import * as api from '@/api/api.js';
	import * as config from "@/api/config.js";
	import eHealth from "@/libs/eHealth.js";
	import wechat from "@/libs/wechat";
	import {
		pathToBase64,
		base64ToPath
	} from 'image-tools'
	import {
		toLogin
	} from '@/libs/login.js';
	import {
		mapGetters
	} from "vuex";
	const app = getApp();

	export default {
		name: 'create',
		mixins: [page_mixin],
		computed: mapGetters(['appConfig', 'uid', 'isLogin', 'userInfo', 'patientInfo']),
		data() {
			return {
				verify: false,
				heightInput: 60,
				loading: false,
				show: false,
				msg: '',
				dawnMsgBox: '',
				success: false,
				isCheck: false,
				showAgree: false,
				maskCloseable: false,
				borderRadius: 40,
				notice: [],
				radiusNotice: 15,
				closeNoticeShow: true,
				showTime: false,
				maxDate: '',
				showTitle: '',
				showTimeName: '',
				paramsTime: {
					year: true,
					month: true,
					day: true,
					hour: false,
					minute: false,
					second: false
				},
				showSelect: false,
				showSelectType: '',
				selectTitle: '',
				selectData: [],
				selectLabelName: '',
				selectValueName: '',
				imgFront: '../../static/images/card_front.png',
				imgReverse: '../../static/images/card_reverse.png',
				imgHandheld: '../../static/images/card_handheld.png',
				imgOtherFile: '../../static/images/img_sq.png',
				imgHkb: '../../static/images/img_hkb1.png',
				imgUpload: '../../static/images/img_upload.png',
				formData: {
					hospitalNo: '',
					leaveHospitalDate: '',
					leaveHospitalDept: '',
					medicalType: '',
					number: 1,
					purpose: '',
					content: '',
					patientType: '年满18岁',
					relation: '本人',
					patientName: '',
					patientCardNo: '',
					patientCardImgFront: '',
					patientCardImgReverse: '',
					patientCardImgHandheld: '',
					applicantName: '',
					applicantCardNo: '',
					applicantCardImgFront: '',
					applicantCardImgReverse: '',
					applicantCardImgHandheld: '',
					otherFile: '',
					collectType: '自提',
					recipientName: '',
					recipientPhone: '',
				},
				queryData: {
					id: 0
				},
				list: [],
				stepNum: 1,
				steps: [{
						name: '业务选择',
						icon: 'order-fill',
						selectIcon: 'order-fill'
					},
					{
						name: '证件上传',
						icon: 'identity-fill',
						selectIcon: 'identity-fill'
					},
					{
						name: '收取方式',
						icon: 'logistics-fill',
						selectIcon: 'logistics-fill'
					},
					{
						name: '确认申请',
						icon: 'image-text-fill',
						selectIcon: 'image-text-fill'
					}
				],
				showNation: false,
				article: {},
				showDict: false,
				dictData: {},
				dictList: [],
				dictSelected: [],
				medicalTypeList: [],
				deptList: [],
				contentList: [],
				purposeList: [],
				collectAddress: []
			}
		},
		onLoad(options) {
			if (!this.isLogin || !this.userInfo.id) {
				this.loading = true;
				toLogin();
			} else {
				let that = this;
				// wechat.verifyInstance();
				if (options.hasOwnProperty('itemId')) {
					this.queryData.id = options.itemId;
				}
				// this.initData();
				if (options.hasOwnProperty('registerOrderId')) {
					let registerOrderId = options.registerOrderId;
					let verifyOrderId = options.order_id;
					UserPatient.veifyUserPatient(this.userInfo.openid, this.patientInfo.id, registerOrderId, verifyOrderId)

				} else {
					this.verify = true
				}
			}
		},
		methods: {
			initData() {
				let that = this;

				if (!this.patientInfo.id) {
					this.show = true;
					this.msg = '请先添加就诊人！';
					return;
				}
				

				this.formData.patientName = this.patientInfo.name;
				this.formData.patientCardNo = this.patientInfo.cardNo;
				this.formData.recipientName = this.patientInfo.name;
				this.formData.recipientPhone = this.patientInfo.phone;

				const date = DateUtil.getDay(8)
				this.maxDate = dayjs(date).format("YYYY-MM-DD");
				console.info(this.maxDate);

				ArticleApi.getArticlePage({
					categoryKey: config.CMS_TYPE.MEDICAL_NOTICE
				}).then(res => {
					// console.table(res)
					if (res.code === 0) {
						const l = res.data.list || [];
						if (l.length > 0) {
							let str = this.$util.htmlToStr(l[0].content);
							that.notice.push(str);
							that.$set(this, 'article', l[0]);
							that.showAgree = true;
						}
					}
				});

				api.getDictDataListByBiz(config.DICT_TYPE.BIZ_MEDICAL_COPY).then(res => {
					// console.table(res)
					if (res.code === 0) {
						that.$set(this, 'dictData', res.data);
						that.purposeList = that.dictData[config.DICT_TYPE.MEDICAL_PURPOSE];
						that.contentList = that.dictData[config.DICT_TYPE.MEDICAL_CONTENT];
						that.collectAddress = that.dictData[config.DICT_TYPE.COLLECT_ADDRESS];
						that.deptList = that.dictData[config.DICT_TYPE.MEDICAL_DEPT];
						that.medicalTypeList = that.dictData[config.DICT_TYPE.MEDICAL_TYPE];
						if (that.medicalTypeList.length > 0) {
							that.medicalTypeList[0].status = 1;
						}
					}
					that.getDetail();
				});

			},
			getDetail() {
				let that = this;
				if (this.queryData.id) {
					this.queryData.userId = this.userInfo.id;
					this.queryData.openid = this.userInfo.openid;
					MedicalCopyApi.getMedicalCopy(this.queryData).then(res => {
						this.loading = false;
						console.table(res)
						if (res.code === 0) {
							this.$set(this, 'formData', res.data);
							this.purposeList.forEach(function(item) {
								if (that.formData.purpose.indexOf(item.value) > -1) {
									item.status = 1;
								}
							});
							this.contentList.forEach(function(item) {
								if (that.formData.content.indexOf(item.value) > -1) {
									item.status = 1;
								}
							});
						} else {
							this.show = true;
							this.msg = res.msg;
						}
						
						
					}).catch(err => {
						this.loading = false;
						this.show = true;
					})
				}

			},
			getAddress(data) {
				console.info("getAddress");
				console.table(data);
				this.formData.recipientName = data.name;
				this.formData.recipientPhone = data.mobile;
				this.formData.recipientAddress = data.detailAddress;
			},
			onSubmit() {
				let that = this;
				this.$set(this.formData, 'id', this.queryData.id);
				// if (!this.formData.gender) {
				// 	return this.$util.Tips({
				// 		title: '住院号不能为空'
				// 	});
				// }
				this.showBox = false;
				this.loading = true;
				this.show = false;
				this.dawnMsgBox = 'popup';
				this.formData.userId = this.userInfo.id;
				this.formData.pid = this.patientInfo.id;
				this.formData.openid = this.userInfo.openid;
				this.formData.patientId = this.patientInfo.patientId;
				this.formData.patientName = this.patientInfo.name;
				this.formData.status = 0;
				MedicalCopyApi.createMedicalCopy(this.formData).then(res => {
					that.loading = false;
					console.table(res);
					if (res.code === 0) {
						that.$util.Tips({
							title: '操作成功'
						});
						uni.navigateTo({
							url: '/hosp/medicalcopy/list'
						})
					} else {
						that.show = true;
						that.msg = res.msg;
					}
				}).catch(res => {
					that.loading = false;
					that.$util.Tips({
						title: res
					});
					return;
				});
			},
			onSteps(type) {
				console.info(this.stepNum);
				if (type === 'left') {
					this.stepNum--;
				} else {
					if (this.stepNum === 1) {
						if (!this.formData.hospitalNo) {
							return this.$util.Tips({
								title: '请填写住院号'
							});
						}
						if (!this.formData.leaveHospitalDate) {
							return this.$util.Tips({
								title: '请选择出院日期'
							});
						}
						if (!this.formData.leaveHospitalDept) {
							return this.$util.Tips({
								title: '请选择出院科室'
							});
						}

						let flag = false;
						for (const item of this.purposeList) {
							if (item.status === 1) {
								flag = true;
								break;
							}
						}
						if (!flag) {
							return this.$util.Tips({
								title: '请选择复印用途'
							});
						}

						flag = false;
						for (const item of this.contentList) {
							if (item.status === 1) {
								flag = true;
								break;
							}
						}
						if (!flag) {
							return this.$util.Tips({
								title: '请选择复印内容'
							});
						}

					} else if (this.stepNum === 2) {
						if (this.formData.patientType === '年满18岁') {
							if (!this.formData.patientCardImgFront) {
								return this.$util.Tips({
									title: '请上传患者身份证人像面'
								});
							}
							if (!this.formData.patientCardImgReverse) {
								return this.$util.Tips({
									title: '请上传患者身份证国徽面'
								});
							}
							// if (!this.formData.patientCardImgHandheld) {
							// 	return this.$util.Tips({
							// 		title: '请上传患者身份证手持照'
							// 	});
							// }
						} else {
							if (!this.formData.patientCardImgFront) {
								return this.$util.Tips({
									title: '请上传患者户口本页'
								});
							}
							if (!this.formData.patientCardImgReverse) {
								return this.$util.Tips({
									title: '请上传申请人户口本页'
								});
							}
						}

						if (!this.formData.patientName) {
							return this.$util.Tips({
								title: '请填写患者姓名'
							});
						}
						if (!this.formData.patientCardNo) {
							return this.$util.Tips({
								title: '请填写患者证件号'
							});
						}
						if (this.formData.relation !== '本人') {
							if (!this.formData.applicantCardImgFront) {
								return this.$util.Tips({
									title: '请上传申请人身份证人像面'
								});
							}
							if (!this.formData.applicantCardImgReverse) {
								return this.$util.Tips({
									title: '请上传申请人身份证国徽面'
								});
							}
							// if (!this.formData.applicantCardImgHandheld) {
							// 	return this.$util.Tips({
							// 		title: '请上传申请人身份证手持照'
							// 	});
							// }
							if (!this.formData.applicantName) {
								return this.$util.Tips({
									title: '请填写申请人姓名'
								});
							}
							if (!this.formData.applicantCardNo) {
								return this.$util.Tips({
									title: '请填写申请人证件号'
								});
							}
							if (!this.formData.otherFile && this.formData.relation !== '监护人') {
								return this.$util.Tips({
									title: '请上传授权委托书照片'
								});
							}
						} else {
							this.formData.applicantName = this.formData.patientName;
							this.formData.applicantCardNo = this.formData.patientCardNo;
						}
					} else if (this.stepNum === 3) {
						let that = this;

						if (!this.formData.recipientName) {
							return this.$util.Tips({
								title: '请填写取件人姓名'
							});
						}
						if (!this.formData.recipientPhone) {
							return this.$util.Tips({
								title: '请填写取件人电话'
							});
						}

						let val = '';
						this.purposeList.forEach(function(item) {
							if (item.status === 1) {
								val += '【' + item.value + '】 ';
							}
						});
						that.formData.purpose = val;

						val = '';
						this.contentList.forEach(function(item) {
							if (item.status === 1) {
								val += '【' + item.value + '】 ';
							}
						});
						that.formData.content = val;

						val = '';
						this.medicalTypeList.forEach(function(item) {
							if (item.status === 1) {
								val += '【' + item.value + '】 ';
							}
						});
						that.formData.medicalType = val;

						if (that.formData.collectType === '邮寄') {

						} else {
							// that.formData.recipientAddress = this.collectAddress[0].value + '|' + this.collectAddress[0]
							// 	.label;
							that.formData.recipientAddress = this.collectAddress[0].label;
						}
					}
					this.stepNum++;
				}
				console.info(this.stepNum);
			},
			scan() {
				let that = this;
				// 允许从相机和相册扫码
				// uni.scanCode({
				// 	success: function (res) {
				// 		console.log('条码类型：' + res.scanType);
				// 		console.log('条码内容：' + res.result);
				// 		that.formData.hospitalNo = res.result;
				// 	}
				// });
				wx.scanQRCode({
					needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
					scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码，默认二者都有
					success: function(res) {
						var result = res.resultStr; // 当 needResult 为 1 时，扫码返回的结果
						var resultArr = result.split(','); // 扫描结果以逗号分割数组(一维码)
						var codeContent = resultArr[resultArr.length - 1]; // 获取数组最后一个元素，也就是最终的内容 
						that.formData.hospitalNo = res.result;
					},
					fail: function(response) {
						console.log("调用wx.scanQRCode扫码失败");
					},
				});
			},
			chooseDict(item) {
				if (item.status === 1) {
					item.status = 0;
				} else {
					item.status = 1;
				}
			},
			onAgree() {
				this.showAgree = false;
				this.isCheck = true;
				this.maskCloseable = true;
			},
			openBox(type) {
				this.showSelectType = type;
				if (type === 'leaveHospitalDate') {
					this.showTime = true;
					this.showTimeName = type;
					this.showTitle = '请选择出院日期';
				} else if (type === 'leaveHospitalDept') {
					this.showSelect = true;
					this.selectTitle = '出院科室';
					this.selectData = this.dictData[config.DICT_TYPE.MEDICAL_DEPT];
				} else if (type === 'patientType') {
					this.showSelect = true;
					this.selectTitle = '患者类型';
					this.selectData = this.dictData[config.DICT_TYPE.PATIENT_TYPE];
				} else if (type === 'relation') {
					this.showSelect = true;
					this.selectTitle = '与患者关系';
					this.selectData = this.dictData[config.DICT_TYPE.PATIENT_RELATION];
				}
			},
			// 日期选择器
			calendarConfirm(event) {
				console.table(event)
				const date = event.date;
				const day = DateUtil.getNowDiff(date)
				console.info(day);
				if (day > 7) {
					this.$set(this.formData, this.showTimeName, date);
				} else {
					return this.$util.Tips({
						title: '只可复印出院7天后的病案'
					});
				}
			},
			confirmBox(event, type) {
				console.table(event);
				if (type === 'date') {
					const date = event.year + '-' + event.month + '-' + event.day;
					this.$set(this.formData, this.showTimeName, date);
				} else if (type === 'select') {
					// const label = event[0]['label'];
					const value = event[0]['value'];
					this.$set(this.formData, this.showSelectType, value);
					if(this.showSelectType === 'patientType'){
						if(value === '未满18岁(未成年)'){
							this.formData.relation = '监护人';
						}else {
							if(this.formData.relation === '监护人'){
								this.formData.relation = '';
							}
						}
					}
				}
			},
			uploadpic(name) {
				this.$util.uploadImageOne({}, res => {
					this.$set(this.formData, name, res.data);
					this.onOcrIdCard(name, res.data);
				});
			},
			onOcrIdCard(name, path) {
				let that = this;
				this.loading = true;
				if (name === 'patientCardImgFront' || name === 'applicantCardImgFront') {
					// this.formData.img = data;
					this.formData.imgUrl = path;
					ToolsApi.ocrIdCard(this.formData).then(res => {
						that.loading = false;
						console.table(res);
						if (res.code === 0) {
							if (name === 'patientCardImgFront') {
								that.formData.patientCardNo = res.data.id;
								that.formData.patientName = res.data.name;
							} else if (name === 'applicantCardImgFront') {
								that.formData.applicantCardNo = res.data.id;
								that.formData.applicantName = res.data.name;
							}
						}
					}).catch(err => {
						that.loading = false;
					})
				} else {
					this.loading = false;
				}
			},
			// 删除
			delImage(name) {
				this.$set(this.formData, name, '');
			},
			// 预览
			previewImage(name) {
				console.info(this.formData[name]);
				var url = this.formData[name];
				uni.previewImage({
					urls: [url],
				});
			},
			strMask(str) {
				return this.$util.strMask(str, 6);
			},
			formatDate: function(date) {
				return dayjs(date).format("YYYY-MM-DD");
			},
			formatDateTime: function(date) {
				return dayjs(date).format("YYYY-MM-DD HH:mm:ss");
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list-icon-text,
	.list-image-text {
		padding: 20rpx 5rpx;
		border-bottom: 1px solid $dawn-theme-color-light;
	}

	.list-box {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 15rpx 10rpx;
		border-bottom: 1rpx solid $dawn-line-color;

		&__left {
			display: flex;
			align-items: center;
			justify-content: end;
			width: 90px;
			padding-right: 10rpx;
			white-space: nowrap;
		}

		&__right {
			display: flex;
			align-items: center;
			justify-content: flex-end;
			width: calc(100% - 90px);
			;

			&__text {
				font-size: $dawn-font-size-lg;
				font-weight: bolder;
			}

			&__icon {
				font-size: 40rpx;
				padding-left: 7rpx;
			}
		}
	}

	.upload-card-box {
		width: 100%;
		display: flex;
		// justify-content: space-between;
		justify-content: space-around;
		align-items: baseline;
		padding: 10px 5px;
	}

	.card-img {
		position: relative;
		width: 35%;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		&__img {
			width: 100%;
			height: 120rpx;
			border-radius: $dawn-border-radius;
		}

		&__text {
			margin-top: 10rpx;
			font-size: $dawn-font-size-ss;
			color: $dawn-color-grey;
			text-align: center;
			white-space: nowrap;
		}

		&__del {
			margin-top: 10rpx;
			font-size: $dawn-font-size-lg;
			color: #992019;
			text-align: center;
			white-space: nowrap;
		}

		.del_btn {
			position: absolute;
			top: -30rpx;
			right: -20rpx;
			width: 50rpx;
			height: 50rpx;
			border-radius: 50%;
			z-index: 20;
			// color: #992019;
			color: $dawn-color-grey;
			font-size: 50rpx;
			opacity: 0.8;
		}
	}

	.dawn-check-box {
		position: relative;
		padding: 20rpx 0rpx;
		margin: 10rpx;
		border-radius: $dawn-box-radius;
		text-align: center;
		white-space: nowrap;
		background-color: $dawn-bg-grey !important;

		&__select {
			transition: transform .4s;
			font-size: $dawn-font-size-md + 2;
			// font-weight: bolder;
			background-color: $dawn-theme-color-light !important;

			&--icon {
				color: $dawn-theme-color !important;
				position: absolute;
				bottom: -4upx;
				right: -2upx;
				font-size: 40rpx;
				text-align: center;
				// line-height: 50upx;
			}

			&--reverse {
				transform: rotate(-180deg);
			}
		}
	}
</style>